package com.lsh.oms.core.model.order;

import com.lsh.oms.core.model.base.VenderModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author peter
 */
@Setter
@Getter
@NoArgsConstructor
@ToString
public class OrderRoDetail extends VenderModel implements Serializable, Comparable<OrderRoDetail> {

	private static final long serialVersionUID = -4936834902735846718L;

	private Long id;

    private Long returnOrderId;

    private Long skuId;

    private String skuName;

    private BigDecimal saleUnit;

    private BigDecimal qty;

    private BigDecimal realQty;

    private Integer status;

    private String ext;

    private Integer createdAt;

    private Integer updatedAt;

    private Integer zoneId;

    private BigDecimal price;

    private BigDecimal money;

    private Integer returnNote;

    private String makeUpNote;

    private Long itemId;

    private Long tmsId;

    private Integer supplierOrg;

    private Integer itemCode;

    @Override
    public int compareTo(OrderRoDetail ro) {
        if(ro.getSkuId().compareTo(this.skuId) == 0){

            return this.price.compareTo(ro.getPrice());
    }

        return this.skuId.compareTo(ro.getSkuId());
    }
}